package com.kingdee.eas.basedata.master.cssp.app;

import javax.ejb.*;
import java.rmi.RemoteException;
import com.kingdee.bos.*;
import com.kingdee.bos.util.BOSObjectType;
import com.kingdee.bos.metadata.IMetaDataPK;
import com.kingdee.bos.metadata.rule.RuleExecutor;
import com.kingdee.bos.metadata.MetaDataPK;
//import com.kingdee.bos.metadata.entity.EntityViewInfo;
import com.kingdee.bos.framework.ejb.AbstractEntityControllerBean;
import com.kingdee.bos.framework.ejb.AbstractBizControllerBean;
//import com.kingdee.bos.dao.IObjectPK;
import com.kingdee.bos.dao.IObjectValue;
import com.kingdee.bos.dao.IObjectCollection;
import com.kingdee.bos.service.ServiceContext;
import com.kingdee.bos.service.IServiceContext;
import com.kingdee.eas.framework.Result;
import com.kingdee.eas.framework.LineResult;
import com.kingdee.eas.framework.exception.EASMultiException;
import com.kingdee.bos.dao.ormapping.ObjectUuidPK;

import java.lang.String;
import com.kingdee.bos.metadata.entity.EntityViewInfo;
import com.kingdee.eas.common.EASBizException;
import com.kingdee.bos.dao.IObjectPK;
import java.util.Map;
import com.kingdee.eas.basedata.framework.DataBaseDCollection;
import com.kingdee.eas.basedata.master.cssp.CustomerSaleInfoInfo;
import com.kingdee.bos.metadata.entity.SelectorItemCollection;
import com.kingdee.eas.framework.CoreBaseCollection;
import java.util.Set;
import com.kingdee.eas.basedata.framework.app.DataBaseDControllerBean;
import java.util.HashSet;
import com.kingdee.eas.basedata.master.cssp.CustomerCompanyInfoInfo;
import com.kingdee.bos.dao.IObjectValue;
import com.kingdee.eas.framework.CoreBaseInfo;
import com.kingdee.eas.basedata.master.cssp.CustomerCollection;
import com.kingdee.eas.framework.ObjectBaseCollection;
import com.kingdee.bos.util.BOSUuid;
import com.kingdee.eas.basedata.org.CtrlUnitInfo;
import java.util.List;
import com.kingdee.eas.framework.DataBaseCollection;
import com.kingdee.eas.basedata.master.cssp.CustomerInfo;



public abstract class AbstractCustomerControllerBean extends DataBaseDControllerBean implements CustomerController
{
    protected AbstractCustomerControllerBean()
    {
    }

    protected BOSObjectType getBOSType()
    {
        return new BOSObjectType("BF0C040E");
    }

    public CustomerInfo getCustomerInfo(Context ctx, IObjectPK pk) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("c0d9de9a-0104-1000-e000-0031c0a81225"), new Object[]{ctx, pk});
            invokeServiceBefore(svcCtx);
            CustomerInfo retValue = (CustomerInfo)_getValue(ctx, pk);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected IObjectValue _getValue(Context ctx, IObjectPK pk) throws BOSException, EASBizException
    {
        return super._getValue(ctx, pk);
    }

    public CustomerInfo getCustomerInfo(Context ctx, IObjectPK pk, SelectorItemCollection selector) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("c0d9de9a-0104-1000-e000-0032c0a81225"), new Object[]{ctx, pk, selector});
            invokeServiceBefore(svcCtx);
            CustomerInfo retValue = (CustomerInfo)_getValue(ctx, pk, selector);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected IObjectValue _getValue(Context ctx, IObjectPK pk, SelectorItemCollection selector) throws BOSException, EASBizException
    {
        return super._getValue(ctx, pk, selector);
    }

    public CustomerCollection getCustomerCollection(Context ctx, EntityViewInfo view) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("c0d9de9a-0104-1000-e000-0033c0a81225"), new Object[]{ctx, view});
            invokeServiceBefore(svcCtx);
            CustomerCollection retValue = (CustomerCollection)_getCollection(ctx, svcCtx, view);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected IObjectCollection _getCollection(Context ctx, IServiceContext svcCtx, EntityViewInfo view) throws BOSException
    {
        return super._getCollection(ctx, svcCtx, view);
    }

    public CustomerCollection getCustomerCollection(Context ctx, String oql) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("c0d9de9a-0104-1000-e000-0034c0a81225"), new Object[]{ctx, oql});
            invokeServiceBefore(svcCtx);
            CustomerCollection retValue = (CustomerCollection)_getCollection(ctx, svcCtx, oql);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected IObjectCollection _getCollection(Context ctx, IServiceContext svcCtx, String oql) throws BOSException
    {
        return super._getCollection(ctx, svcCtx, oql);
    }

    public CustomerCollection getCustomerCollection(Context ctx) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("c0d9de9a-0104-1000-e000-0035c0a81225"), new Object[]{ctx});
            invokeServiceBefore(svcCtx);
            CustomerCollection retValue = (CustomerCollection)_getCollection(ctx, svcCtx);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected IObjectCollection _getCollection(Context ctx, IServiceContext svcCtx) throws BOSException
    {
        return super._getCollection(ctx, svcCtx);
    }

    public CustomerInfo getCustomerInfo(Context ctx, String oql) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("c0d9de9a-0104-1000-e000-0036c0a81225"), new Object[]{ctx, oql});
            invokeServiceBefore(svcCtx);
            CustomerInfo retValue = (CustomerInfo)_getValue(ctx, oql);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected IObjectValue _getValue(Context ctx, String oql) throws BOSException, EASBizException
    {
        return super._getValue(ctx, oql);
    }

    public CustomerCompanyInfoInfo getCustomerCompanyInfo(Context ctx, IObjectPK customerPK, IObjectPK companyInfoPK) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("c6a876bb-0104-1000-e000-0024c0a81225"), new Object[]{ctx, customerPK, companyInfoPK});
            invokeServiceBefore(svcCtx);
            CustomerCompanyInfoInfo retValue = (CustomerCompanyInfoInfo)_getCustomerCompanyInfo(ctx, customerPK, companyInfoPK);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract IObjectValue _getCustomerCompanyInfo(Context ctx, IObjectPK customerPK, IObjectPK companyInfoPK) throws BOSException, EASBizException;

    public CustomerCompanyInfoInfo getCustomerCompanyInfo(Context ctx, IObjectPK pk) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("c6a876bb-0104-1000-e000-002bc0a81225"), new Object[]{ctx, pk});
            invokeServiceBefore(svcCtx);
            CustomerCompanyInfoInfo retValue = (CustomerCompanyInfoInfo)_getCustomerCompanyInfo(ctx, pk);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract IObjectValue _getCustomerCompanyInfo(Context ctx, IObjectPK pk) throws BOSException, EASBizException;

    public CustomerCompanyInfoInfo getCustomerCompanyInfo(Context ctx, IObjectPK pk, SelectorItemCollection selecterItem) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("c6a876bb-0104-1000-e000-002fc0a81225"), new Object[]{ctx, pk, selecterItem});
            invokeServiceBefore(svcCtx);
            CustomerCompanyInfoInfo retValue = (CustomerCompanyInfoInfo)_getCustomerCompanyInfo(ctx, pk, selecterItem);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract IObjectValue _getCustomerCompanyInfo(Context ctx, IObjectPK pk, SelectorItemCollection selecterItem) throws BOSException, EASBizException;

    public CustomerCompanyInfoInfo getCustomerCompanyInfo(Context ctx, IObjectPK customerPK, IObjectPK companyPK, SelectorItemCollection selecter) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("c6a876bb-0104-1000-e000-0034c0a81225"), new Object[]{ctx, customerPK, companyPK, selecter});
            invokeServiceBefore(svcCtx);
            CustomerCompanyInfoInfo retValue = (CustomerCompanyInfoInfo)_getCustomerCompanyInfo(ctx, customerPK, companyPK, selecter);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract IObjectValue _getCustomerCompanyInfo(Context ctx, IObjectPK customerPK, IObjectPK companyPK, SelectorItemCollection selecter) throws BOSException, EASBizException;

    public CustomerCompanyInfoInfo getCustomerCompanyInfo(Context ctx, String custoemrNumber, String companyOrgNumber) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("c6a876bb-0104-1000-e000-0038c0a81225"), new Object[]{ctx, custoemrNumber, companyOrgNumber});
            invokeServiceBefore(svcCtx);
            CustomerCompanyInfoInfo retValue = (CustomerCompanyInfoInfo)_getCustomerCompanyInfo(ctx, custoemrNumber, companyOrgNumber);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract IObjectValue _getCustomerCompanyInfo(Context ctx, String custoemrNumber, String companyOrgNumber) throws BOSException, EASBizException;

    public CustomerSaleInfoInfo getCustomerSaleInfo(Context ctx, IObjectPK pk) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("c727dc61-0104-1000-e000-0010c0a81225"), new Object[]{ctx, pk});
            invokeServiceBefore(svcCtx);
            CustomerSaleInfoInfo retValue = (CustomerSaleInfoInfo)_getCustomerSaleInfo(ctx, pk);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract IObjectValue _getCustomerSaleInfo(Context ctx, IObjectPK pk) throws BOSException, EASBizException;

    public CustomerSaleInfoInfo getCustomerSaleInfo(Context ctx, IObjectPK pk, SelectorItemCollection selector) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("c727dc61-0104-1000-e000-0014c0a81225"), new Object[]{ctx, pk, selector});
            invokeServiceBefore(svcCtx);
            CustomerSaleInfoInfo retValue = (CustomerSaleInfoInfo)_getCustomerSaleInfo(ctx, pk, selector);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract IObjectValue _getCustomerSaleInfo(Context ctx, IObjectPK pk, SelectorItemCollection selector) throws BOSException, EASBizException;

    public CustomerSaleInfoInfo getCustomerSaleInfo(Context ctx, IObjectPK customerPK, IObjectPK saleInfo) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("c727dc61-0104-1000-e000-0017c0a81225"), new Object[]{ctx, customerPK, saleInfo});
            invokeServiceBefore(svcCtx);
            CustomerSaleInfoInfo retValue = (CustomerSaleInfoInfo)_getCustomerSaleInfo(ctx, customerPK, saleInfo);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract IObjectValue _getCustomerSaleInfo(Context ctx, IObjectPK customerPK, IObjectPK saleInfo) throws BOSException, EASBizException;

    public CustomerSaleInfoInfo getCustomerSaleInfo(Context ctx, IObjectPK customerPK, IObjectPK salePK, SelectorItemCollection selector) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("c727dc61-0104-1000-e000-001dc0a81225"), new Object[]{ctx, customerPK, salePK, selector});
            invokeServiceBefore(svcCtx);
            CustomerSaleInfoInfo retValue = (CustomerSaleInfoInfo)_getCustomerSaleInfo(ctx, customerPK, salePK, selector);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract IObjectValue _getCustomerSaleInfo(Context ctx, IObjectPK customerPK, IObjectPK salePK, SelectorItemCollection selector) throws BOSException, EASBizException;

    public CustomerSaleInfoInfo getCustomerSaleInfo(Context ctx, String customerNum, String saleNum) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("c727dc61-0104-1000-e000-0021c0a81225"), new Object[]{ctx, customerNum, saleNum});
            invokeServiceBefore(svcCtx);
            CustomerSaleInfoInfo retValue = (CustomerSaleInfoInfo)_getCustomerSaleInfo(ctx, customerNum, saleNum);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract IObjectValue _getCustomerSaleInfo(Context ctx, String customerNum, String saleNum) throws BOSException, EASBizException;

    public void approve(Context ctx, IObjectPK customerPK) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("ebe67bc5-0104-1000-e000-0045c0a81233"), new Object[]{ctx, customerPK});
            invokeServiceBefore(svcCtx);
            _approve(ctx, customerPK);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _approve(Context ctx, IObjectPK customerPK) throws BOSException, EASBizException;

    public Map approve(Context ctx, IObjectPK[] pks) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("45a5e1c3-0108-1000-e000-0009c0a81221"), new Object[]{ctx, pks});
            invokeServiceBefore(svcCtx);
            Map retValue = (Map)_approve(ctx, pks);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract Map _approve(Context ctx, IObjectPK[] pks) throws BOSException, EASBizException;

    public void unApprove(Context ctx, IObjectPK customerPK, boolean isUnApprove) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("ebe67bc5-0104-1000-e000-0047c0a81233"), new Object[]{ctx, customerPK, new Boolean(isUnApprove)});
            invokeServiceBefore(svcCtx);
            _unApprove(ctx, customerPK, isUnApprove);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _unApprove(Context ctx, IObjectPK customerPK, boolean isUnApprove) throws BOSException, EASBizException;

    public Map unApprove(Context ctx, IObjectPK[] customerPks) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("59e4089d-010e-1000-e000-0001c0a812d9"), new Object[]{ctx, customerPks});
            invokeServiceBefore(svcCtx);
            Map retValue = (Map)_unApprove(ctx, customerPks);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract Map _unApprove(Context ctx, IObjectPK[] customerPks) throws BOSException, EASBizException;

    public boolean isExistOtherInfo(Context ctx, IObjectPK customerPK) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("ebe67bc5-0104-1000-e000-004bc0a81233"), new Object[]{ctx, customerPK});
            invokeServiceBefore(svcCtx);
            boolean retValue = (boolean)_isExistOtherInfo(ctx, customerPK);
            svcCtx.setMethodReturnValue(new Boolean(retValue));
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract boolean _isExistOtherInfo(Context ctx, IObjectPK customerPK) throws BOSException, EASBizException;

    public void freezed(Context ctx, IObjectPK customerPK, boolean isForceFreezed) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("ebfaa1c7-0104-1000-e000-0035c0a81233"), new Object[]{ctx, customerPK, new Boolean(isForceFreezed)});
            invokeServiceBefore(svcCtx);
            _freezed(ctx, customerPK, isForceFreezed);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _freezed(Context ctx, IObjectPK customerPK, boolean isForceFreezed) throws BOSException, EASBizException;

    public void unFreezed(Context ctx, IObjectPK customerPK, boolean isForceUnFreezed) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("ebfaa1c7-0104-1000-e000-0037c0a81233"), new Object[]{ctx, customerPK, new Boolean(isForceUnFreezed)});
            invokeServiceBefore(svcCtx);
            _unFreezed(ctx, customerPK, isForceUnFreezed);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _unFreezed(Context ctx, IObjectPK customerPK, boolean isForceUnFreezed) throws BOSException, EASBizException;

    public void updateCheck(Context ctx, IObjectPK pk, IObjectValue value) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("1c543045-0108-1000-e000-000ac0a81254"), new Object[]{ctx, pk, value});
            invokeServiceBefore(svcCtx);
            _updateCheck(ctx, pk, value);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _updateCheck(Context ctx, IObjectPK pk, IObjectValue value) throws BOSException, EASBizException;

    public boolean isExistCustomerByInter(Context ctx, String orgId) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("43136ce4-0109-1000-e000-0007c0a8121c"), new Object[]{ctx, orgId});
            invokeServiceBefore(svcCtx);
            boolean retValue = (boolean)_isExistCustomerByInter(ctx, orgId);
            svcCtx.setMethodReturnValue(new Boolean(retValue));
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract boolean _isExistCustomerByInter(Context ctx, String orgId) throws BOSException, EASBizException;

    public CustomerCollection getCustomerCollectionByInter(Context ctx, String orgId) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("43136ce4-0109-1000-e000-0009c0a8121c"), new Object[]{ctx, orgId});
            invokeServiceBefore(svcCtx);
            CustomerCollection retValue = (CustomerCollection)_getCustomerCollectionByInter(ctx, orgId);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract CustomerCollection _getCustomerCollectionByInter(Context ctx, String orgId) throws BOSException, EASBizException;

    public boolean isHasDeal(Context ctx, IObjectPK pk) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("ae90639e-0109-1000-e000-0002c0a8121c"), new Object[]{ctx, pk});
            invokeServiceBefore(svcCtx);
            boolean retValue = (boolean)_isHasDeal(ctx, pk);
            svcCtx.setMethodReturnValue(new Boolean(retValue));
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract boolean _isHasDeal(Context ctx, IObjectPK pk) throws BOSException, EASBizException;

    public boolean isExistCustomerByInter(Context ctx, String interOrgId, String comOrgId) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("3add7a3e-010b-1000-e000-0007c0a8121c"), new Object[]{ctx, interOrgId, comOrgId});
            invokeServiceBefore(svcCtx);
            boolean retValue = (boolean)_isExistCustomerByInter(ctx, interOrgId, comOrgId);
            svcCtx.setMethodReturnValue(new Boolean(retValue));
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract boolean _isExistCustomerByInter(Context ctx, String interOrgId, String comOrgId) throws BOSException, EASBizException;

    public CustomerCollection getCustomerCollectionByInter(Context ctx, String interOrgId, String comOrgId) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("3add7a3e-010b-1000-e000-0008c0a8121c"), new Object[]{ctx, interOrgId, comOrgId});
            invokeServiceBefore(svcCtx);
            CustomerCollection retValue = (CustomerCollection)_getCustomerCollectionByInter(ctx, interOrgId, comOrgId);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract CustomerCollection _getCustomerCollectionByInter(Context ctx, String interOrgId, String comOrgId) throws BOSException, EASBizException;

    public CustomerCollection getCustomerCollectionByComOrg(Context ctx, String comOrgID) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("a9e56433-010d-1000-e000-0002c0a8121c"), new Object[]{ctx, comOrgID});
            invokeServiceBefore(svcCtx);
            CustomerCollection retValue = (CustomerCollection)_getCustomerCollectionByComOrg(ctx, comOrgID);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract CustomerCollection _getCustomerCollectionByComOrg(Context ctx, String comOrgID) throws BOSException, EASBizException;

    public String checkInternalCompanyExist(Context ctx, BOSUuid id) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("a1814470-010e-1000-e000-0001c0a812d9"), new Object[]{ctx, id});
            invokeServiceBefore(svcCtx);
            String retValue = (String)_checkInternalCompanyExist(ctx, id);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract String _checkInternalCompanyExist(Context ctx, BOSUuid id) throws BOSException, EASBizException;

    public List isExistCustomerByInter(Context ctx, List ids) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("9d8617ee-010f-1000-e000-0001c0a8121c"), new Object[]{ctx, ids});
            invokeServiceBefore(svcCtx);
            List retValue = (List)_isExistCustomerByInter(ctx, ids);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract List _isExistCustomerByInter(Context ctx, List ids) throws BOSException, EASBizException;

    public boolean isExistInterCustomer(Context ctx, Map param) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("1d6d180f-0113-1000-e000-0012c0a8129f"), new Object[]{ctx, param});
            invokeServiceBefore(svcCtx);
            boolean retValue = (boolean)_isExistInterCustomer(ctx, param);
            svcCtx.setMethodReturnValue(new Boolean(retValue));
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract boolean _isExistInterCustomer(Context ctx, Map param) throws BOSException, EASBizException;

    public void createCustomerByTransfer(Context ctx, Map param) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("1d6d180f-0113-1000-e000-0017c0a8129f"), new Object[]{ctx, param});
            invokeServiceBefore(svcCtx);
            _createCustomerByTransfer(ctx, param);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _createCustomerByTransfer(Context ctx, Map param) throws BOSException, EASBizException;

    public CustomerCollection getInterCustomerCollection(Context ctx, String orgid, String cuid) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("22b1ea61-0113-1000-e000-000ac0a8129f"), new Object[]{ctx, orgid, cuid});
            invokeServiceBefore(svcCtx);
            CustomerCollection retValue = (CustomerCollection)_getInterCustomerCollection(ctx, orgid, cuid);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract CustomerCollection _getInterCustomerCollection(Context ctx, String orgid, String cuid) throws BOSException, EASBizException;

    public void batchAssign2(Context ctx, String cuid, String[] diddata, String[] cuiddata, HashSet assistData) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("299576bf-011a-1000-e000-0008c0a8125a"), new Object[]{ctx, cuid, diddata, cuiddata, assistData});
            invokeServiceBefore(svcCtx);
            _batchAssign2(ctx, cuid, diddata, cuiddata, assistData);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _batchAssign2(Context ctx, String cuid, String[] diddata, String[] cuiddata, HashSet assistData) throws BOSException, EASBizException;

    public void batchAssign2(Context ctx, String cuid, String sql, HashSet basedata, HashSet cuData, HashSet assistData) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("299576bf-011a-1000-e000-000fc0a8125a"), new Object[]{ctx, cuid, sql, basedata, cuData, assistData});
            invokeServiceBefore(svcCtx);
            _batchAssign2(ctx, cuid, sql, basedata, cuData, assistData);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _batchAssign2(Context ctx, String cuid, String sql, HashSet basedata, HashSet cuData, HashSet assistData) throws BOSException, EASBizException;

    public void batchAssignAssist(Context ctx, String cuid, String[] diddata, String[] cuiddata, HashSet assistData) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("2d8fded6-011a-1000-e000-0014c0a8125a"), new Object[]{ctx, cuid, diddata, cuiddata, assistData});
            invokeServiceBefore(svcCtx);
            _batchAssignAssist(ctx, cuid, diddata, cuiddata, assistData);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _batchAssignAssist(Context ctx, String cuid, String[] diddata, String[] cuiddata, HashSet assistData) throws BOSException, EASBizException;

    public void batchAssignAssist(Context ctx, String cuid, String sql, HashSet basedata, HashSet cuData, HashSet assistData) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("2d8fded6-011a-1000-e000-0015c0a8125a"), new Object[]{ctx, cuid, sql, basedata, cuData, assistData});
            invokeServiceBefore(svcCtx);
            _batchAssignAssist(ctx, cuid, sql, basedata, cuData, assistData);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _batchAssignAssist(Context ctx, String cuid, String sql, HashSet basedata, HashSet cuData, HashSet assistData) throws BOSException, EASBizException;

    public Map getEditUIInitData(Context ctx, String customerId, CtrlUnitInfo curCtrlUnitInfo) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("bb38077a-8243-4b6e-8021-59cfd2ed4a53"), new Object[]{ctx, customerId, curCtrlUnitInfo});
            invokeServiceBefore(svcCtx);
            Map retValue = (Map)_getEditUIInitData(ctx, customerId, curCtrlUnitInfo);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract Map _getEditUIInitData(Context ctx, String customerId, CtrlUnitInfo curCtrlUnitInfo) throws BOSException, EASBizException;

    public void batchDelete(Context ctx, Set ids) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("ce316239-caa5-4154-ae91-cf35422a1e87"), new Object[]{ctx, ids});
            invokeServiceBefore(svcCtx);
            _batchDelete(ctx, ids);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _batchDelete(Context ctx, Set ids) throws BOSException, EASBizException;

    public void batchUnAssignAssist(Context ctx, String cuId, String[] orgIds, String[] dataIds, HashSet assistDataSet) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("f4c87fdb-5eb1-4395-a7d3-156535762068"), new Object[]{ctx, cuId, orgIds, dataIds, assistDataSet});
            invokeServiceBefore(svcCtx);
            _batchUnAssignAssist(ctx, cuId, orgIds, dataIds, assistDataSet);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _batchUnAssignAssist(Context ctx, String cuId, String[] orgIds, String[] dataIds, HashSet assistDataSet) throws BOSException, EASBizException;

    public void batchUnAssignAssist(Context ctx, String cuId, String[] orgIds, String dataSql, String[] notInDataIds, HashSet assistDataSet) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("f62a6f37-3621-44cf-b5cc-7680d7b4fdb6"), new Object[]{ctx, cuId, orgIds, dataSql, notInDataIds, assistDataSet});
            invokeServiceBefore(svcCtx);
            _batchUnAssignAssist(ctx, cuId, orgIds, dataSql, notInDataIds, assistDataSet);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _batchUnAssignAssist(Context ctx, String cuId, String[] orgIds, String dataSql, String[] notInDataIds, HashSet assistDataSet) throws BOSException, EASBizException;

    public String readNewNumber(Context ctx, String cuId, CustomerInfo customerInfo) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("b55b47af-c186-4976-a330-fbacc466d12a"), new Object[]{ctx, cuId, customerInfo});
            invokeServiceBefore(svcCtx);
            String retValue = (String)_readNewNumber(ctx, cuId, customerInfo);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract String _readNewNumber(Context ctx, String cuId, CustomerInfo customerInfo) throws BOSException, EASBizException;

    public DataBaseDCollection getDataBaseDCollection (Context ctx) throws BOSException
    {
    	return (DataBaseDCollection)(getCustomerCollection(ctx).cast(DataBaseDCollection.class));
    }
    public DataBaseDCollection getDataBaseDCollection (Context ctx, EntityViewInfo view) throws BOSException
    {
    	return (DataBaseDCollection)(getCustomerCollection(ctx, view).cast(DataBaseDCollection.class));
    }
    public DataBaseDCollection getDataBaseDCollection (Context ctx, String oql) throws BOSException
    {
    	return (DataBaseDCollection)(getCustomerCollection(ctx, oql).cast(DataBaseDCollection.class));
    }
    public DataBaseCollection getDataBaseCollection (Context ctx) throws BOSException
    {
    	return (DataBaseCollection)(getCustomerCollection(ctx).cast(DataBaseCollection.class));
    }
    public DataBaseCollection getDataBaseCollection (Context ctx, EntityViewInfo view) throws BOSException
    {
    	return (DataBaseCollection)(getCustomerCollection(ctx, view).cast(DataBaseCollection.class));
    }
    public DataBaseCollection getDataBaseCollection (Context ctx, String oql) throws BOSException
    {
    	return (DataBaseCollection)(getCustomerCollection(ctx, oql).cast(DataBaseCollection.class));
    }
    public ObjectBaseCollection getObjectBaseCollection (Context ctx) throws BOSException
    {
    	return (ObjectBaseCollection)(getCustomerCollection(ctx).cast(ObjectBaseCollection.class));
    }
    public ObjectBaseCollection getObjectBaseCollection (Context ctx, EntityViewInfo view) throws BOSException
    {
    	return (ObjectBaseCollection)(getCustomerCollection(ctx, view).cast(ObjectBaseCollection.class));
    }
    public ObjectBaseCollection getObjectBaseCollection (Context ctx, String oql) throws BOSException
    {
    	return (ObjectBaseCollection)(getCustomerCollection(ctx, oql).cast(ObjectBaseCollection.class));
    }
    public CoreBaseCollection getCoreBaseCollection (Context ctx) throws BOSException
    {
    	return (CoreBaseCollection)(getCustomerCollection(ctx).cast(CoreBaseCollection.class));
    }
    public CoreBaseCollection getCoreBaseCollection (Context ctx, EntityViewInfo view) throws BOSException
    {
    	return (CoreBaseCollection)(getCustomerCollection(ctx, view).cast(CoreBaseCollection.class));
    }
    public CoreBaseCollection getCoreBaseCollection (Context ctx, String oql) throws BOSException
    {
    	return (CoreBaseCollection)(getCustomerCollection(ctx, oql).cast(CoreBaseCollection.class));
    }
}